<?
include_once($_SERVER['DOCUMENT_ROOT']."/lucy/config.php");

class translate{
	
	public $komands = array();
	public $mods = array();
	public $komand;

	function translate($komand){
		$this->komand = $komand;
	}
	
	function split(){
		$this->komands = explode(" ", $this->komand);
	}

	function get_mods(){
		if(!$dbcon){include(INC.'dbcon.php');}
		foreach($this->komands AS $name){
			$sql = "SELECT `mod` FROM `dictionary` WHERE `name` = '$name'";
			$rez = mysql_query($sql, $dbcon);
			if(mysql_num_rows($rez)){
				$mod = mysql_fetch_assoc($rez);
				$this->mods[] = $mod['mod'];
			}
		}
	}
	
	function save_komand(){
		
		
	}
















}